// 添加新章节
const addChapter = (chapter) => {
    return $axios({
        url: '/chapter',
        method: 'POST',
        data: { ...chapter }
    })
}

// 章节管理
const queryChapterAll = (bookId) => {
    return $axios({
        url: `/chapter/${bookId}`,
        method: 'GET',
    })
}

// 章节管理编辑
const editChapter = (chapterId) => {
    return $axios({
        url: `/chapter/edit/${chapterId}`,
        method: 'GET',
    })
}

// 章节管理删除
const deleteChapter = (chapterId) => {
    return $axios({
        url: `/chapter`,
        method: 'delete',
        params: { chapterId }
    })
}
// 删除接口
const deleteType = (ids) => {
    return $axios({
        //请求路径
        url: '/type',
        method: 'delete',
        params: { ids }
    })
}

